The present disclosure generally relates to computing devices, and more particularly to processing an input/output (I/O) request from an application.
An operating system (OS) kernel serves as an intermediary layer between the hardware and software (e.g., an application). The kernel passes application requests to the hardware and acts as a low-level driver to address the hardware devices and components of the system. The kernel may be viewed as a comprehensive library of functions that can be invoked by an application. A system call is an interface between the application and library. By invoking a system call, an application can request a service that the kernel then fulfills.
For example, in networking, an application may send data though the kernel for transmission over a network. In a conventional system, the application marshals packets of data and invokes a system call into the kernel. A system call may slow down the system because the application stops executing and control of the central processing unit (CPU) is transferred to the kernel, which then copies the data to be transmitted over the network into a private memory space (e.g., kernel memory buffer) and queues the data for transmission. After the kernel sends the applicable data over the network, the kernel returns execution control to the application. When the application desires to send more data over the network at a later point in time, the application again marshals packets of data and invokes the system call into the kernel.
While the use of the system call is safe and secure, the use of the system call is also inefficient because it causes the CPU to encounter a trap, which is a slow process whereby execution of the next natural execution of the CPU data flow is halted and moved to another location.